import { myget, mypost } from './index'

//获取验证码
export const getCaptcha = () => myget('/users/captche?time' + Date.now())
// 获取用户列表
export const getUserlist = (data) => myget('/users/list', data)
//根据token获取用户信息
export const getUserInfo = () => myget('/users/getUserInfo')
export const getRemarks = () => myget('/users/getRemarks')
export const getUserInfoById = (id) => myget('/users/getUserInfoById/' + id)
///用户登录
export const login = (data) => mypost('/users/login', data)
// 用户注册
// export const register = (data) => post('/register/cellphone', data)

export const getUserlistAll = (data) => {
	return myget('/users/listAll', data)
}
// 修改用户
export const UpdateUser = (data) => {
	return mypost('/users/update', data)
}
// 模糊查询用户
export const SearchUser = (data) => {
	return myget('/users/findLike', data)
}
// 添加用户
export const addUser = (data) => {
	return mypost('/users/add', data)
} // 批量添加
export const addUserList = (data) => {
	return mypost('/users/updateList', data)
}
// 删除用户
export const delUser = (data) => {
	return mypost('/users/del', data)
}
// 修改密码
export const updatePwd = (data) => {
	return mypost('/users/updatePwd', data)
}
